﻿<%@ Page Language="C#" MasterPageFile="~/Report/reportSite.master" AutoEventWireup="true" CodeFile="supplierStatistic_Report.aspx.cs"
    Theme="DXConnect" Inherits="supplierStatisticForm" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v12.1, Version=12.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx1" %>
<%@ Register assembly="DevExpress.XtraCharts.v12.1.Web, Version=12.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraCharts.Web" tagprefix="dxchartsui" %>
<%@ Register assembly="DevExpress.XtraCharts.v12.1, Version=12.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraCharts" tagprefix="cc1" %>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <div class="mainContent registration">
        <div class="contentHeader">
            <div class="content">
                <img id="registrationTitle" src="../Images/title_supplier_statistic.png" 
                    alt="Schedule" />
            </div>
        </div>
        <div class="content">

            <table style="width:100%;">
                <tr>
                    <td style="width: 122px">
                        &nbsp;</td>
                    <td>
                        Supplier:&nbsp;
                        <asp:DropDownList ID="supplierListDropDownList" runat="server" 
                            AutoPostBack="True" DataSourceID="supplierListSqlDataSource" 
                            DataTextField="Name" DataValueField="Name" Height="21px" 
                            onselectedindexchanged="supplierListDropDownList_SelectedIndexChanged" 
                            Width="194px">
                        </asp:DropDownList>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                             </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="width: 122px">
                        &nbsp;</td>
                    <td>
                        <dxchartsui:WebChartControl ID="supplierStatisticWebChartControl" 
                            runat="server" DataSourceID="individualSupplierSqlDataSource" 
                            Height="329px" Width="718px" AppearanceNameSerializable="Pastel Kit">
                            <diagramserializable>
                                <cc1:SimpleDiagram>
                                </cc1:SimpleDiagram>
                            </diagramserializable>
<FillStyle><OptionsSerializable>
<cc1:SolidFillOptions></cc1:SolidFillOptions>
</OptionsSerializable>
</FillStyle>

                            <seriesserializable>
                                <cc1:Series ArgumentDataMember="Model" LabelsVisibility="True" Name="Quantity" 
                                    SynchronizePointOptions="False" ValueDataMembersSerializable="QuantitySUM">
                                    <viewserializable>
                                        <cc1:PieSeriesView ExplodeMode="MaxValue" RuntimeExploding="False">
                                        </cc1:PieSeriesView>
                                    </viewserializable>
                                    <labelserializable>
                                        <cc1:PieSeriesLabel LineVisible="True" Position="Inside">
                                            <fillstyle>
                                                <optionsserializable>
                                                    <cc1:SolidFillOptions />
                                                </optionsserializable>
                                            </fillstyle>
                                            <pointoptionsserializable>
                                                <cc1:PiePointOptions PointView="ArgumentAndValues">
                                                    <valuenumericoptions format="Percent" precision="0" />
                                                </cc1:PiePointOptions>
                                            </pointoptionsserializable>
                                        </cc1:PieSeriesLabel>
                                    </labelserializable>
                                    <legendpointoptionsserializable>
                                        <cc1:PiePointOptions PercentOptions-ValueAsPercent="False" 
                                            PointView="ArgumentAndValues">
                                            <valuenumericoptions format="Number" />
                                        </cc1:PiePointOptions>
                                    </legendpointoptionsserializable>
                                </cc1:Series>
                            </seriesserializable>

<SeriesTemplate><ViewSerializable>
    <cc1:PieSeriesView RuntimeExploding="False">
    </cc1:PieSeriesView>
</ViewSerializable>
<LabelSerializable>
    <cc1:PieSeriesLabel LineVisible="True">
        <fillstyle>
            <optionsserializable>
                <cc1:SolidFillOptions />
            </optionsserializable>
        </fillstyle>
        <pointoptionsserializable>
            <cc1:PiePointOptions>
            </cc1:PiePointOptions>
        </pointoptionsserializable>
    </cc1:PieSeriesLabel>
</LabelSerializable>
<LegendPointOptionsSerializable>
    <cc1:PiePointOptions>
    </cc1:PiePointOptions>
</LegendPointOptionsSerializable>
</SeriesTemplate>

                            <titles>
                                <cc1:ChartTitle Antialiasing="False" />
                            </titles>

<CrosshairOptions><CommonLabelPositionSerializable>
<cc1:CrosshairMousePosition></cc1:CrosshairMousePosition>
</CommonLabelPositionSerializable>
</CrosshairOptions>

<ToolTipOptions><ToolTipPositionSerializable>
<cc1:ToolTipMousePosition></cc1:ToolTipMousePosition>
</ToolTipPositionSerializable>
</ToolTipOptions>
                        </dxchartsui:WebChartControl>
                    </td>

                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="width: 122px">
                        &nbsp;</td>
                    <td>
                        <asp:SqlDataSource ID="supplierListSqlDataSource" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:CocShopDatabaseConnectionString %>" 
                            SelectCommand="SELECT [Name] FROM [Supplier]" 
                            ProviderName="<%$ ConnectionStrings:CocShopDatabaseConnectionString.ProviderName %>"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="individualSupplierSqlDataSource" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:CocShopDatabaseConnectionString %>" 
                            ProviderName="<%$ ConnectionStrings:CocShopDatabaseConnectionString.ProviderName %>" 
                            SelectCommand="SELECT c.Name ,b.Model, SUM(a.Quantity) as [QuantitySUM] FROM OrderScheduling a, Product b, Supplier c WHERE (a.ProductID = b.ProductID AND a.SupplierID = c.SupplierID AND c.Name LIKE @name)  GROUP BY c.Name ,b.Model">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="supplierListDropDownList" Name="name" 
                                    PropertyName="SelectedValue" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="width: 122px">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>

        </div>
    </div>
</asp:Content>
